#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>

#define EXE "hello.out"

int create_process(const char* path, char* args[])
{
    int ret = fork();
    if (ret == 0) {
        execve(path, args, NULL);
    }

    return ret;
}

int main()
{
    char* args[] = {EXE, NULL};

    printf("Begin\n");
    
    printf("pid = %d\n", getpid());
    
    printf("child pid = %d\n", create_process(EXE, args));

    printf("End\n");

    return 0;
}
